<div id="view-content">
    <table class="grid">
        <tr class ="gridheader">
            <td>Job Title</td>
            <td>No of Vacancy</td>
            <td>Application Deadline</td>
        </tr>
        <?php
         $basepath = Zend_Controller_Front::getInstance()->getBaseUrl();
        $format ="<tr>
                    <td><a href='$basepath/jobs/jobdetail/jobid/%d'>%s</a></td>
                    <td>%s</td>
                    <td>%s</td>
               </tr>";
        if (count($this->paginator) == 0)
            echo 'Sorry no jobs in the selected category';
        else {

            foreach ($this->paginator as $job) {
                //var_dump($job);
                printf($format, $job['JobID'], $job['JobTitle'], $job['NoOfVacancy'], $job['ApplicationDeadline'] );
            }
        }
        ?>
        <tr><td>
                <div class ="pagingcontrol">
            <?php
    if($this->paginator->getTotalItemCount() > $this->paginator->getItemCountPerPage())
        echo $this->paginationControl($this->paginator, 'Elastic', 'controls.phtml', array('first'=>'hoem')); ?>
                </div> </td></tr>
    </table>
</div>